Window FromFunction
When you exit the development environment, your design windows are lost. You can reload
any program you have saved, of course, but the design windows no longer exist. The grid
functions GuiDesigner created from your design windows are part of your program, but not
the design windows.
So how do you tweak your original designs if you ever want to?
You can edit the grid function, which is not hard, since grid functions are to easy to
read. Better yet, select W indow F romFunction in the toolkit Menu and let
GuiDesigner convert the grid function back into a design window.
That's right! GuiDesigner reads the text in your grid function, figures out what it means,
and recreates a design window like the one that generated the grid function in the first
place.
GuiDesigner looks at the kid constant definitions, the Create subroutine, plus four lines
of code near the bottom that assign values to designX ,designY ,designWidth ,designHeight
. This is all the information necessary to recreate the design window.
Any custom code you've added, like a Resize routine for example, does not affect the
design window. When the design window is converted back into a grid function, code outside
the Create subroutine is not modified if you select Update . Any code you added is lost if
you specify Replace - be careful !!!
Be sure any code you add to grid functions and callback functions contains kid number
constants, not literal kid numbers. Kid numbers may change when you change the layout of a
design window and convert it back into code, while kid names don't change unless you
change them purposely in the Appearance Window.
W indow F romFunction stops at the first blank or comment line in the Create
subroutine, so don't add any unless that's your intent.